package com.gexin.model.agent;

import com.gexin.common.utils.SQLUtils;
import com.gexin.model.agent.base.BaseAgentLevel;
import com.jfinal.plugin.activerecord.Page;

/**
 * 业务名称:  t_agent_level() 
 */
@SuppressWarnings("serial")
public class AgentLevel extends BaseAgentLevel<AgentLevel> {
	public static final AgentLevel dao = new AgentLevel();

	public AgentLevel findByNameFirst(String name) {
		return	findFirst("select * from t_agent_level where name=?",name);
	}


	public AgentLevel findById(String id){
		return findFirst("select * from t_agent_level where id=?",id);
	}
	public Page<AgentLevel> findLevelPageList(int page , int pageSize) {
		SQLUtils sql = new SQLUtils();
		sql.append(" from t_agent_level ");
		return paginate(page,pageSize,"select * ",sql.toString());
	}
}
